-- GENERATED SPELL FOR [Maggoc] --


function spell0_20600(pUnit, Event) --@Boulder,n/a--
pUnit:FullCastSpellOnTarget(42139,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20600', 610, 1)
end

function spell1_20600(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(40743,pUnit)
pUnit:RegisterEvent('Sorts_20600', 30287, 1)
end

function spell2_20600(pUnit, Event) --@Mortal Wound,n/a--
pUnit:FullCastSpellOnTarget(38770,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20600', 20315, 1)
end

function spell3_20600(pUnit, Event) --@Rock Rumble,n/a--
pUnit:FullCastSpellOnTarget(38777,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20600', 640, 1)
end

function Sorts_20600(pUnit, Event)
local choix_sorts_20600 = math.random(0, 3)
if choix_sorts_20600 == 0 then
pUnit:RegisterEvent('spell0_20600', 1, 1)
end
if choix_sorts_20600 == 1 then
pUnit:RegisterEvent('spell1_20600', 1, 1)
end
if choix_sorts_20600 == 2 then
pUnit:RegisterEvent('spell2_20600', 1, 1)
end
if choix_sorts_20600 == 3 then
pUnit:RegisterEvent('spell3_20600', 1, 1)
end
end

function mob20600_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20600', math.random(1500, 3000), 1)
end

function mob20600_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20600_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20600_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20600, 1, 'mob20600_Action')
RegisterUnitEvent(20600, 2, 'mob20600_Leave')
RegisterUnitEvent(20600, 3, 'mob20600_Kill')
RegisterUnitEvent(20600, 4, 'mob20600_Die')
